<script setup>
defineProps({
  gameView: Object
})

const emit = defineEmits(["edit"])
const editHandle = () => {
  emit("edit", "gameView")
}
</script>

<template>
  <el-descriptions
      border :column="1"
      title="游戏预览">
    <template #extra>
      <el-button @click="editHandle" type="success">修改</el-button>
    </template>
    <el-descriptions-item label="图片">
      <el-image
          v-for="(item, index) in gameView.imageUrl"
          :key="index"
          style="height: 100px;margin: 0 10px"
          :src="item.url"
          :preview-src-list="[item.url]"/>
    </el-descriptions-item>
    <el-descriptions-item label="视频">
      <video
          v-for="(item, index) in gameView.videoUrl"
          :key="index"
          style="width: 900px;"
          controls width="100%">
        <source :src="item.url" type="video/webm">
      </video>
    </el-descriptions-item>
  </el-descriptions>
</template>

<style scoped>

</style>
